import request from '@/utils/request';
import store from "@/store";

const env = import.meta.env.MODE || 'development';
const prefix = '';

// 列表 /apiapp/v1/warehouse_user/list
export function warehouseUserListApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_user/list`,
    method: 'get',
    params
  });
}

// 详情 /apiapp/v1/warehouse_user/details
export function warehouseUserDetailApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_user/details`,
    method: 'get',
    params
  });
}

// 新增 /apiapp/v1/warehouse_user/create
export function warehouseUserCreateApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_user/create`,
    method: 'post',
    data
  });
}

// 编辑 /apiapp/v1/warehouse_user/edit
export function warehouseUserEditApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_user/edit`,
    method: 'post',
    data
  });
}

// 删除 /apiapp/v1/warehouse_user/delete
export function warehouseUserDeleteApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/warehouse_user/delete`,
    method: 'post',
    data
  });
}


// 管理员
// 列表 /apiapp/v1/admin/list
export function adminListApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/admin/list`,
    method: 'get',
    params
  });
}

// 详情 /apiapp/v1/admin/details
export function adminDetailApi (params) {
  return request({
    url: `${prefix}/apiapp/v1/admin/details`,
    method: 'get',
    params
  });
}

// 新增 /apiapp/v1/admin/create
export function adminCreateApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/admin/create`,
    method: 'post',
    data
  });
}

// 编辑 /apiapp/v1/admin/edit
export function adminEditApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/admin/edit`,
    method: 'post',
    data
  });
}

// 删除 /apiapp/v1/admin/delete
export function adminDeleteApi (data) {
  return request({
    url: `${prefix}/apiapp/v1/admin/delete`,
    method: 'post',
    data
  });
}
